package com.gitee.cc.system.exception;

import com.gitee.cc.system.enums.AuthExceptionEnum;

/**
 * @author : cc
 * @date : Create in 14:28 2018/10/29
 */
public class AuthException extends RuntimeException {

    /**
     * 错误码
     */
    private Integer code;
    /**
     * 错误消息
     */
    private String defaultMessage;

    public AuthException(Integer code,String defaultMessage) {
        super(defaultMessage);
    }
    public AuthException(AuthExceptionEnum exceptionEnum) {
        super(exceptionEnum.getMsg());
        this.code = exceptionEnum.getCode();
    }
}
